<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<!-- 
	<link rel="stylesheet" href="${pageContext.request.contextPath }/css/bootstrap.css" />
	<link rel="stylesheet" href="${pageContext.request.contextPath }/css/css.css" />
	<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery1.9.0.min.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath }/js/bootstrap.min.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath }/js/sdmenu.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath }/js/laydate/laydate.js"></script>
  	 -->
  	<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery1.9.0.min.js"></script>
  	<style type="text/css">
  	 body{background-color: #9999ff}
  	 span{font-style:italic; }
  	 a{text-decoration: none;}
  	 ul,li,h5,h6{margin:0px;padding:0px;list-style:none;}
	 .nav{float:right;cursor:pointer;width:60px;}
	 h6{ background:#9999ff;}
	 .menu{ position:relative;width:}
	 .nav ul{ display:none;}
  	</style>
  	<script type="text/javascript">
		
		//通过className获取对象
	     function getElementsByClass(parent, sClass){
			 var elements = parent.getElementsByTagName("*");
			 var result = [];
			 for(var i = 0; i < elements.length; i++ ){			
				 if( elements[i].className == sClass){				 
				    result.push(elements[i]);	 
				 }
			 }
			 return result;
		 }
		 
		 window.onload = function(){
	        var navigation = document.getElementById("navigation");		
			var navLi = getElementsByClass(navigation,"nav");	
		    var menuLi = getElementsByClass(navigation,"menu");	
			//第一级菜单的显示隐藏
			for(var i = 0; i < navLi.length; i++){
				//鼠标移入显示
				navLi[i].onmouseover = function(){
					var ul = this.getElementsByTagName("ul")[0];
					ul.style.display = "block";	
					
				}
				//鼠标移出隐藏
				navLi[i].onmouseout = function(){
					var ul = this.getElementsByTagName("ul")[0];	   
					ul.style.display = "none";	
					
				}		
			}
			
			$("#userInfo").click(function(){
				$("#userInfo").attr({"href":"../infoQuery/AccountInfo.jsp","target":"main"});
			});
			
			$("#close").click(function(){
				var result=confirm("您确定要注销退出系统吗？");
	  			if(result==true){
	  				window.parent.location="../login/login.jsp";
	  			}
			});
		 }
	</script>
</head>
<body>
  <div align="center">
    <!-- 顶部  -->
    <div style="margin-top: 5px;float: left;">
        <span><font size="6" style="color: white">递四方物流管理后台</font></span>
    </div>	
    <div style="float: right;">
        <h5><a href="${pageContext.request.contextPath }/jsp/homePage/homePage.jsp" target="_blank"><font style="color: white">公司首页</font></a></h5>
    </div>	
    <div>
	    <ul id="navigation">
			<li class = "nav">
		    	<h5 id="name" style="color: white">${sessionScope.empInfo.empname}</h5>
		    	<ul>
		        	<li class = "menu">
		            	<h6><a href="${pageContext.request.contextPath }/jsp/background/infoQuery/AccountInfo.jsp" target="main" id="userInfo"><font style="color: white">个人信息</font></a></h6>
		            </li>
		            <li class="menu">
		            	<h6><a href="#" id="close"><font style="color: white">注销账号</font></a></h6>
		            </li>
		        </ul>
		    </li>
	    </ul>
   </div>
  </div>
</body>
</html>